package org.mcflier.appuntamento.data.model.abstracts;

import org.mcflier.appuntamento.data.model.interfaces.IProduction;

public abstract class AbstractProduction implements IProduction {
	
	public AbstractProduction(int id, String name){
		if(name == null)
			throw new NullPointerException("Production; Name must not be null");
		if(id<0)
			throw new IllegalArgumentException("Production: Id must be equal or greater than zero");
		
		this.setId(id);
		this.setName(name);
	}

	@Override
	public abstract int getId();

	protected abstract void setId(int id);
	
	@Override
	public abstract String getName();

	protected abstract void setName(String name);
}
